package com.yichi.global;

import com.yichi.util.JsonUtil;

import java.util.Map;

/**
 * mqtt回消息
 */
public class PlatformResult {
    private Integer code;
    private String response;
    private String msg;
    private Map<String, Object> data;

    public PlatformResult(Integer code, String response, String msg) {
        this.code = code;
        this.response = response;
        this.msg = msg;
    }

    public String toJsonString() {
        String json = JsonUtil.toJSONString(this);
        return json;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getResponse() {
        return response;
    }

    public void setResponse(String response) {
        this.response = response;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }
}
